<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('更新成功！');
	document.location.reload();
}else{
	alert('出错了！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div class="page-title">
	<div class="in">
    		<div class="titlebar"><h2>登录设置</h2><p>淘宝账号一键登录API信息设置，请填写通用型api的信息，注意回调URL必须是http://你的网站访问路径/tblogin.php</p></div>
            <div class="clear"></div>
    </div>
</div>
<div class="content">
	<div class="simplebox grid740">
    	<div class="titleh">
        	<h3>登录设置</h3>
        </div>
        <div class="body">
          <form id="form" action="{url('Setting','SaveLogin')}" method="post">
          	<div class="st-form-line">	
            	<span class="st-labeltext">Api Key</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="key" id="key-input" value="{$info['key']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="key-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
          
          	<div class="st-form-line">	
            	<span class="st-labeltext">Api Secret</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="secret" id="secret-input" value="{$info['secret']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="secret-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="button-box">
           	  <input type="submit" class="st-button" value="确认">
           	  <input type="reset" class="st-clear" value="取消">
            </div>
          </form>
        </div>
    </div>
</div>